package com.eden.data.controller;


import com.eden.data.service.InviteMemberService;
import eden.api.common.dto.InviteMemberDto;
import eden.api.common.model.EdenResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("api")
public class OpenController {

    private final InviteMemberService inviteMemberService;

    @PostMapping("member")
    public EdenResult<?> inviteMember(@RequestBody InviteMemberDto inviteMemberDto){
        inviteMemberService.inviteMember(inviteMemberDto);
        return EdenResult.ok("");
    }

}
